/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.nodes.objects;

import java.beans.IntrospectionException;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Canvas;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Frame;
import pl.edu.amu.wmi.kino.visualjavafx.nodes.objects.helpers.JavaFxChildren;
import pl.edu.amu.wmi.kino.visualjavafx.nodes.objects.helpers.JavaFxNode;

/**
 *
 * @author psychollek
 */
public class FrameNode extends JavaFxNode<Frame>{

    public FrameNode(Frame frame) throws IntrospectionException {
        super(frame, new FrameChildren(frame));
    }

}

class FrameChildren extends JavaFxChildren<Canvas>{

    private Frame frame = null;

    FrameChildren(Frame frame) {
        this.frame = frame;
    }

    @Override
    public void addNotify(){
        this.setKeys(new Canvas[] {frame.getCanvas()});
    }

}